import { createApp } from 'vue'
import App from './App.vue'
import './style.scss'
import Router from './router'
// element-plus默认样式
import 'element-plus/dist/index.css'
// message提示
import ElMessage from '@/utils/message'
// pinia存储
import { createPinia } from 'pinia';
// pinia持久化
import piniaPersist from 'pinia-plugin-persistedstate'
// axios请求
import AxiosApi from '@/api/api.js'
// theme改变
import ThemeChange from './utils/theme'

const ThisApp = createApp(App)

ThisApp.config.globalProperties.$Msg = ElMessage
ThisApp.config.globalProperties.$Api = AxiosApi
ThisApp.config.globalProperties.$Theme = ThemeChange

const Pinia = createPinia()
Pinia.use(piniaPersist)
ThisApp.use(Pinia)
ThisApp.use(Router)

ThisApp.mount('#app')
